import request from '@/utils/request';

// 分页获取文章详情
export function getMaterials(params) {
    return request({
        url: `/article/listmsg/${params.pagenum}/${params.pagesize}`,
        method: 'get'
    })
}

// 添加文章
export function addMaterials(data) {
    return request({
        url: `/article/addmsg`,
        method: 'post',
        data:data
    })
}

// 搜索
export function searchMaterials(params) {
    return request({
        url: `/article/selectmsg/${params.pagenum}/${params.pagesize}?keyword=${params.searchValue}`,
        method: 'post'
    })
}